package com.hq.ims.data.entityenum;


import com.hq.web.penum.IBaseEnum;

/**
 * 账号状态
 */
public enum EnumGroupType implements IBaseEnum {

    Auth(0, "权限组"),
    Role(1, "角色"),

    ;

    private final int code;
    private final String typeName;

    EnumGroupType(int code, String typeName) {
        this.code = code;
        this.typeName = typeName;
    }

    /**
     * 根据int类型转换枚举类
     *
     * @param x
     * @return com.hq.data.entityenum.EntityEnumAccountStatus
     */
    public static EnumGroupType getByInt(int x) {
        for (EnumGroupType value : values()) {
            if (value.code == x) {
                return value;
            }
        }
        return null;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getTypeName() {
        return typeName;
    }

    @Override
    public String getValue() {
        return typeName;
    }
}
